<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>连板高度走势图</title>

    <!-- 引入vue    -->
    <script src="echarts.min.js"></script>
</head>

<body>
    <!-- 为 ECharts 准备一个定义了宽高的 DOM -->
    <div id="main" style="width: 1400px;height:700px;"></div>
    <script type="text/javascript">

        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));
        var riqiArray = [
            // '2-19', '2-20', '2-21', '2-22', '2-23',
            '2-26', '2-27', '2-28', '2-29', '3-1',
            '3-4', '3-5', '3-6', '3-7', '3-8',
            '3-11', '3-12', '3-13', '3-14', '3-15',
            '3-18', '3-19', '3-20', '3-21', '3-22',
            '3-25', '3-26', '3-27', '3-28', '3-29',
            '4-1','4-2'
        ];
        var lianbanGaoduArray = [
            // 7, 8, 9, 10, 11,
            12, 13, 8, 5, 6,
            5, 6, 7, 5, 4,
            5, 6, 7, 8, 9,
            10, 11, 12, 13, 6,
            7, 5, 6, 7, 7,
            8,9
        ];
        var biaojiArray = [
            {
                name: '华生科技',
                yAxis: 9,
                xAxis: '4-2',
                value: '华生科技',
                itemStyle: {
                    color: '#ff0000'
                }
            },
            {
                name: '宁科生物',
                yAxis: 7,
                xAxis: '3-28',
                value: '宁科生物',
                itemStyle: {
                    color: '#ff0000'
                }
            },
            {
                name: '博信股份',
                yAxis: 7,
                xAxis: '3-25',
                value: '博信股份',
                itemStyle: {
                    color: '#ff0000'
                }
            },
            {
                name: '艾艾精工',
                yAxis: 13,
                xAxis: '3-21',
                value: '艾艾精工',
                itemStyle: {
                    color: '#ff0000'
                }
            },
            {
                name: '文投控股',
                yAxis: 5,
                xAxis: '3-7',
                value: '文投控股',
                itemStyle: {
                    color: '#ff0000'
                }
            }, {
                name: '安奈儿',
                yAxis: 7,
                xAxis: '3-6',
                value: '安奈儿',
                itemStyle: {
                    color: '#ff0000'
                }
            },
            {
                name: '东方精工',
                yAxis: 6,
                xAxis: '3-1',
                value: '东方精工',
                itemStyle: {
                    color: '#ff0000'
                }
            },
            {
                name: '华扬联众、国脉文化',
                yAxis: 8,
                xAxis: '2-28',
                value: '华扬联众、国脉文化',
                itemStyle: {
                    color: '#ff0000'
                }

            }, {
                name: '克来机电',
                yAxis: 13,
                xAxis: '2-27',
                value: '克来机电',
                itemStyle: {
                    color: '#ff0000'
                }
            }
        ];


        // 指定图表的配置项和数据
        var option = {
            title: {
                text: "连板高度",
                textStyle: {
                    fontSize: 30,
                    center: true
                }
            },
            tooltip: {
                trigger: 'axis'
            },
            xAxis: {
                name: "日期",
                type: 'category',
                data: riqiArray
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    name: "连板高度",
                    showAllSymbol: true,
                    data: lianbanGaoduArray,
                    type: 'line',
                    smooth: true,
                    itemStyle: {
                        color: '#ff0000',
                        normal: {
                            label: {
                                show: true
                            }
                        }
                    },
                    markPoint: {
                        data: biaojiArray
                    },
                    markLine: {
                        data: [
                            {
                                yAxis: '13',
                                name: "最大范围",
                                itemStyle: {
                                    color: "#2E90D1"
                                }
                            },
                            {
                                yAxis: '4',
                                name: "最小范围",
                                itemStyle: {
                                    color: "#2E90D1"
                                }
                            }
                        ]
                    }
                }
            ],


        };
        myChart.setOption(option);
        // 使用刚指定的配置项和数据显示图表。
        // myChart.setOption(option);
    </script>
</body>

</html>